{extend name='layout/base' /}
{block name='title'}重置密码{/block}
{block name='contentHeader'}
<h1>
    用户管理
    <small>重置密码</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 用户管理</a></li>
    <li class="active">重置密码</li>
</ol>
{/block}
{block name='content'}
<script src="__PLUGIN__/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
<link rel="stylesheet" href="__PLUGIN__/bootstrapvalidator/css/bootstrapValidator.min.css">
<!-- Horizontal Form -->
<div class="box box-info" style="width:90%;margin: 0 auto;">
    <div class="box-header with-border">
        <h3 class="box-title">用户参数</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" action="" method="post">
        <div class="box-body">
            <div class="form-group">
                <label for="password" class="col-sm-2 control-label">用户原密码</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="password" name="password" placeholder="用户原密码">
                </div>
            </div>
            <div class="form-group">
                <label for="newpwd" class="col-sm-2 control-label">用户新密码</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="newpwd" name="newpwd" placeholder="用户新密码">
                </div>
            </div>
            <div class="form-group">
                <label for="confirmpwd" class="col-sm-2 control-label">用户确认密码</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="confirmpwd" name="confirmpwd" placeholder="用户确认密码">
                </div>
            </div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <button type="reset" class="btn btn-default">重置</button>
            <button type="submit" class="btn btn-info pull-right">提交</button>
        </div>
        <!-- /.box-footer -->
    </form>
</div>
<script type="text/javascript">
    //jQuery代码
    $(function () {
        $('form').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                password: {
                    validators: {
                        notEmpty: {
                            message: '用户密码不能为空'
                        }
                    }
                },
                newpwd: {
                    validators: {
                        notEmpty: {
                            message: '用户新密码不能为空'
                        }
                    }
                },
                confirmpwd: {
                    validators: {
                        notEmpty: {
                            message: '用户确认密码不能为空'
                        },
                        identical: {
                            field: 'newpwd',
                            message: '*两次输入密码不一致'
                        }
                    }
                }
            }
        });
    });
</script>
{/block}